package com.jian.cms.entityclass;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Student entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "student", catalog = "hibernate")
public class Student implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    // Fields

    private Integer id;
    private String  name;
    private Integer age;

    // Constructors

    /** default constructor */
    public Student() {
    }

    /** full constructor */
    public Student(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "name")
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "age")
    public Integer getAge() {
        return this.age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

}